package com.csweimei.rentmanagementtreasure.http.entity;

import com.csweimei.rentmanagementtreasure.utils.ValidateUtils;
import com.google.gson.annotations.SerializedName;

import java.io.Serializable;
import java.util.List;

public class CodeListBean extends BaseResult{
    @SerializedName("data")
    private List<DataDTO> data;

    public List<DataDTO> getData() {
        return data;
    }

    public void setData(List<DataDTO> data) {
        this.data = data;
    }

    public static class DataDTO implements Serializable {
        @SerializedName("codeID")
        private int codeID;
        @SerializedName("user_id")
        private int userId;
        @SerializedName("code")
        private String codeX;
        @SerializedName("s_time")
        private String sTime;
        @SerializedName("e_time")
        private String eTime;
        @SerializedName("state")
        private int state;

        public int getCodeID() {
            return codeID;
        }

        public void setCodeID(int codeID) {
            this.codeID = codeID;
        }

        public int getUserId() {
            return userId;
        }

        public void setUserId(int userId) {
            this.userId = userId;
        }

        public String getCodeX() {
            return codeX;
        }

        public void setCodeX(String codeX) {
            this.codeX = codeX;
        }

        public String getSTime() {
            return sTime;
        }

        public void setSTime(String sTime) {
            this.sTime = sTime;
        }

        public String getETime() {
            return "有效期至 "+ ValidateUtils.getTimeByType(eTime,ValidateUtils.TIME_YMDHM);
        }

        public void setETime(String eTime) {
            this.eTime = eTime;
        }

        public int getState() {
            return state;
        }

        public void setState(int state) {
            this.state = state;
        }
    }
}
